<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
</body>
<script type="text/javascript" src="js/JnPakg.js"></script>
<script type="text/javascript">
(function(){
	dw("07_if检测对象是否为空.html");
})();

function textif(obj){
	if(obj){
		dw(obj + " is true");
	}else{
		dw(obj + " is false");
	}
}
textif();//undefined is false
textif(null);//null is false
textif("");//is false
textif("   ");//is true
//textif(a);//根本没有办法运行
var b;
textif(b);//undefined is false
var c = function(){};
textif(c);//function(){} is true




</script>
</html>